<{include file="admin/head.html"}>
<body>
	<{include file="admin/nav.html"}>
	<div id="content">
		<div id="sidebar">
			<ul>
				<li><a href="comment.php?do=comments">查看评论</a></li>
				<li><a href="comment.php?do=addCom">添加评论</a></li>
			</ul>
		</div>
		<div id="main">
			<h2 id="page_title"><{$pageTitle|default:'添加评论'}></h2>
			<form action="comment.php" method="post" enctype="multipart/form-data">
				<table class="form_table">
					<tr>
						<td>对应产品(<span class="required">*</span>)</td>
						<td>
							<select name="p_id" id="sel_product_id">
								<option value="0">请选择</option>
								<{foreach from=$product item=p}>
									<option value="<{$p.id}>"><{$p.name}></option>
								<{/foreach}>
							</select>
						</td>
					</tr>
					<tr>
						<td>评论人(<span class="required">*</span>)</td>
						<td><input type="text" name="user" value="<{$cominfo.user}>"></td>
					</tr>
					<tr>
						<td>email</td>
						<td><input type="text" name="email" value="<{$cominfo.email}>"></td>
					</tr>
					<tr>
						<td>评论内容</td>
						<td><textarea name="words" style="width:80%; height:300px;" value="<{$cominfo.words}>"><{$cominfo.words}></textarea></td>
					</tr>
					
				</table>
				<p>
					<input type="submit" value="提交" name="submit">
					<input type="hidden" value="<{$cominfo.id}>" name="id">
					<input type="hidden" name="do" value="<{$do|default:'addCom'}>">
				</p>
			</form>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			try{
				var pid = '<{$pid}>';
				$("#sel_product_id").val(pid);
			}catch(e){}
		})
	</script>
</body>
</html>